package com.hellobike.haxing.modules.product.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;
import com.hellobike.haxing.modules.product.mapper.typehandler.JSONArrayHandler;
import com.hellobike.haxing.modules.product.mapper.typehandler.JSONObjectHandler;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.hellobike.haxing.common.annotation.Dict;

/**
 * @Description: 前台分类
 * @Author: haxing-boot
 * @Date:   2020-01-20
 * @Version: V1.0
 */
@Data
@TableName(value = "t_front_category", autoResultMap = true)
public class FrontCategory implements Serializable {
    private static final long serialVersionUID = 1L;
    
	/**id*/
	@TableId(type = IdType.AUTO)
    private Long id ;
	/**名称*/
	@Excel(name = "名称", width = 15)
        private String name ;
	/**描述*/
	@Excel(name = "描述", width = 15)
        private String description ;
	/**图标*/
	@Excel(name = "图标", width = 15)
        private String icon ;
	/**父级分类id*/
	@Excel(name = "父级分类id", width = 15)
    private Long parentId ;
	/**层级*/
	@Excel(name = "层级", width = 15)
        private Integer level ;
	/**排序*/
	@Excel(name = "排序", width = 15)
        private Integer sortIndex ;
	/**聚合（商品或后台分类）*/
	@Excel(name = "聚合（商品或后台分类）", width = 15)
	@TableField(typeHandler = JSONObjectHandler.class)
        private JSONObject aggregation ;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
        private Date createTime ;
	/**修改时间*/
	@Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
        private Date updateTime ;
	/**创建人*/
	@Excel(name = "创建人", width = 15)
    private Integer createBy ;
	/**修改人*/
	@Excel(name = "修改人", width = 15)
    private Integer updateBy ;
	/**是否删除：0-否 1-是*/
	@Excel(name = "是否删除：0-否 1-是", width = 15)
      @TableLogic
      private Integer deleted ;
	/**是否启用：0-否 1-是*/
	@Excel(name = "是否启用：0-否 1-是", width = 15)
        private Integer enable ;
	/**推荐商品*/
	@Excel(name = "推荐商品", width = 15)
	@TableField(typeHandler = JSONArrayHandler.class)
        private JSONArray recommends ;
}
